package com.briup.srms.sms.web.controller;

import jdk.nashorn.internal.objects.annotations.Getter;
import jdk.nashorn.internal.objects.annotations.Setter;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * @author: YuYan
 * @date: 2022/5/25 6:08 下午
 */
@RestController

public class TestController {

    @PostMapping("/test")
    public String test2(@RequestParam("ids") List<Long> ids, Long[] dates) {
        System.out.println(ids);
        System.out.println(Arrays.toString(dates));
        return "OK";
    }


    public String test(@RequestBody AttendanceBO bo) {
        System.out.println(bo);
        return "OK";
    }
}

class AttendanceBO {
    private List<Long> dates;
    private List<Long> ids;

    public AttendanceBO() {
    }

    public List<Long> getDates() {
        return dates;
    }

    public void setDates(List<Long> dates) {
        this.dates = dates;
    }

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    @Override
    public String toString() {
        return "AttendanceBO{" +
                "dates=" + dates +
                ", ids=" + ids +
                '}';
    }
}
